package com.dstz.sys.rest.controller;

import com.dstz.base.api.response.impl.ResultMsg;
import com.dstz.demo.core.manager.ImportDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/sys/getData")
public class ImportDataController {

    @Autowired
    private ImportDataService importDataService;

    @Value("${busUrl4}")
    private String BUS_URL;

    @GetMapping("/importJson")
    @ResponseBody
    public ResultMsg importJson() {

        ResultMsg resultMsg = importDataService.httpRequest(BUS_URL);
        return  resultMsg;
    }
}
